
if(window.addEventListener){
  window.addEventListener("load", menuHome, true);
} else if (window.attachEvent){
	window.attachEvent("on"+"load", menuHome);
 
} 

function menuHome() {
  var oMenu = document.getElementById('navegacionhorizontal');
  var aLi = oMenu.getElementsByTagName('li');
  for (var i=0;i<aLi.length;++i) {
    aLi[i].onmouseover = desplegarSecundarios;
    aLi[i].onmouseout = ocultarSecundarios;
  }
}


function desplegarSecundarios() {
      this.className += " estilohover";
}


function ocultarSecundarios(){
      this.className = this.className.replace(" estilohover", "");
}

function ocultamenu(){
  var menu = document.getElementById("nav2");
  menu.style.display = "none";
}
function despliega(){
  var menu = document.getElementById("nav2");
    if(menu.style.display == "none"){
      menu.style.display = "block";
    }
    else{
      menu.style.display = "none";
    }
}
